package com.inexas.cu.server;

import com.google.gwt.event.shared.*;
import com.google.inject.*;
import com.inexas.cu.client.*;
import com.inexas.cu.client.pipe.*;
import com.inexas.cu.client.register.*;
import com.inexas.cu.server.pipe.*;
import com.inexas.cu.server.register.*;
import com.inexas.cu.stratus.*;

public class TestModule extends AbstractModule {

	@Override
	protected void configure() {

		// Server-side bindings...
		
		// Use the Mock implementation of Stratus
		bind(Stratus.class).to(MockStratus.class).in(Singleton.class);
		
		bind(PipeServerEnd.class).to(NullPipe.class).in(Singleton.class);
		
		// Application specific PipeHandlerList must be provided 
		bind(AccountProvider.class).asEagerSingleton();
		
		// Other bindings are default and are set using @ImplementedBy(...)'s

		// Client-side bindings...
		
		// EventBusProvider forces a global singleton for us
		bind(HandlerManager.class).toProvider(EventBusProvider.class);
		
		// 'Eager' forces the pipe to register itself with the event bus
		bind(PipeClientEnd.class).to(NullPipe.class).asEagerSingleton();

		bind(SignInPresenter.class);
	}
	
}
